class Pink:

    def my(self,name,age):
        self.name = ''
        self.age = '' 
    def get_name(self):
        return self.name

    def get_age(self):
        return self.age

class Red(Pink):

    def my(self):
        self.name = 'wangweiya'
        self.age = '26'

yanghaoming = Red()
yanghaoming.my()
print yanghaoming.get_name(),yanghaoming.get_age()